<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Public.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Owlpal.Models.Newsletter>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                DateCreated
            </th>
            <th>
                DateUpdated
            </th>
            <th>
                Subject
            </th>
            <th>
                Status
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new {  id = item.ID }) %> |
                <%= Html.ActionLink("Delete", "Delete", new {  id = item.ID }) %> |
                <%= Html.ActionLink("Details", "Details", new {  id=item.ID  })%>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.DateCreated)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.DateUpdated)) %>
            </td>
            <td>
                <%= Html.Encode(item.Subject) %>
            </td>
            <td>
                <%= Html.Encode(item.Status) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

